﻿using System.Collections.Generic;
using System.Linq;
using Castle.MonoRail.ExtensionMethods.Helpers;
using Castle.MonoRail.Framework;

namespace Castle.MonoRail.ExtensionMethods {
    public static class IRequestExtensions {
        public static IEnumerable<KeyValuePair<string, string>> AsEnumerable(this IRequest request) {
            return request.QueryString.AsEnumerable()
                .Concat(request.Form.AsEnumerable());
        }
    }
}